<template>
	<view class="wrapper">
		<view class="navigate">
			<view class="left">
				<uni-icons type="left" size="27" color="#000" @click="navback"></uni-icons>
			</view>
			<view class="center">交易密码设置</view>
			<view class="right">保存</view>
		</view>
		<view class="block" style="height: 44px;margin-bottom: 24rpx;"></view>
		<view class="input-wrapper">
			<view class="label">设置密码</view>
			<input class="uni-input" placeholder="请设置密码"  placeholder-class="plcstyle" :value="inputClearValue" @input="clearInput" />
			<view class="close">
				<uni-icons type="eye-filled" size="23" color="#E5E5E5" @click="clearIcon"></uni-icons>
			</view>
		</view>
		<view class="input-wrapper">
			<view class="label">确认密码</view>
			<input class="uni-input" placeholder="请确认密码" placeholder-class="plcstyle" :value="inputClearValue" @input="clearInput" />
			<view class="close">
				<uni-icons type="eye-slash-filled" size="23" color="#E5E5E5" @click="clearIcon"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				inputClearValue: '176****0287',
			}
		},
		onLoad() {
			
		},
		methods: {
			navback() {
				uni.navigateBack();
			},
			clearInput: function(event) {
				this.inputClearValue = event.detail.value;
				if (event.detail.value.length > 0) {
					this.showClearIcon = true;
				} else {
					this.showClearIcon = false;
				}
			},
			clearIcon: function() {
				this.inputClearValue = '';
			},
		}
	}
</script>

<style lang="scss">
	page{
		width: 100%;
		height: 100%;
		background-color: #F6F4F9;
	}
	.navigate{
		background-color: rgb(255, 255, 255);
		color: rgb(0, 0, 0);
		position: fixed;
		left: var(--window-left);
		right: var(--window-right);
		height: 44px;
		height: calc(44px + constant(safe-area-inset-top));
		height: calc(44px + env(safe-area-inset-top));
		padding: 7px 3px;
		padding-top: calc(7px + constant(safe-area-inset-top));
		padding-top: calc(7px + env(safe-area-inset-top));
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		align-items: center;
		overflow: hidden;
		-webkit-box-pack: justify;
		-webkit-justify-content: space-between;
		justify-content: space-between;
		box-sizing: border-box;
		z-index: 998;
		-webkit-transition-property: all;
		transition-property: all;
		font-weight: bold;
		.left{
			font-weight: 500;
			margin: 0 4rpx;
		}
		.center{
			width: 548rpx;
			text-align: center;
		}
		.right{
			margin-right: 30rpx;
		}
	}
	.wrapper {
		height: 100%;
		box-sizing: border-box;
		image{
			width: 100%;
		}
	}
	.input-wrapper{
		width: 100%;
		height: 91rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #fff;
		padding: 0 33rpx;
		box-sizing: border-box;
		border-bottom: 1rpx solid #e5e5e5;
		input{
			display: block;
			width: 65%;
			margin-left: 20rpx;
		}
	}
	.plcstyle{
		font-weight: 500;
		font-size: 28rpx;
		color: #999999 !important;
	}
	
</style>